﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BFlatCompile.Nodes
{
	public class MultiplicationChain : Expression
	{
		public Expression[] Expressions { get; private set; }
		public char[] Ops { get; private set; }
		public Token[] Tokens { get; private set; }

		public MultiplicationChain(IList<Expression> expressions, IList<char> ops, IList<Token> tokens)
		{
			this.Expressions = expressions.ToArray();
			this.Ops = ops.ToArray();
			this.Tokens = tokens.ToArray();
		}

		public override void ResolveCode(Class c, Dictionary<object, object> parents)
		{
			foreach (Expression expr in this.Expressions)
			{
				expr.ResolveCode(c, parents);
			}
		}

		public override void ResolveClassToThis(Class c)
		{
			foreach (Expression expr in this.Expressions)
			{
				expr.ResolveClassToThis(c);
			}
		}
	}
}
